@rem: 50rem;

*{
  margin: 0;
  padding: 0;
  border: 0;
}

.switch {
  position: relative;
  width: 200/@rem;
  height: 78/@rem;
  margin-top: 30/@rem;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.switch-checkbox {
  display: none;
}

.switch-label {
  display: block;
  overflow: hidden;
  cursor: pointer;
  border: 2/@rem solid #f4f4f4;
  border-radius: 40/@rem;
  width: 200/@rem;
  text-align: left;
}

.switch-inner {
  display: block;
  width: 200%;
  margin-left: -100%;
  transition: margin 0.3s ease-in 0s;
}

.switch-inner::before, .switch-inner::after {
  display: block;
  float: right;
  width: 50%;
  height: 70/@rem;
  padding: 0;
  line-height: 42/@rem;
  font-size: 42/@rem;
  color: white;
  font-family: Trebuchet, Arial, sans-serif;
  /*font-weight: bold;*/
  box-sizing: border-box;
}

.switch-inner::after {
  content: attr(data-on);
  padding-left: 25/@rem;
  padding-top: 16/@rem;
  background-color: #4cd864;
  color: #FFFFFF;
}

.switch-inner::before {
  content: attr(data-off);
  padding-left: 85/@rem;
  background-color: #EEEEEE;
  padding-top: 16/@rem;
  color: black;
}

.switch-switch {
  position: absolute;
  display: block;
  width: 50/@rem;
  height: 50/@rem;
  margin: 10/@rem;
  background: #FFFFFF;
  top: 0;
  bottom: 0;
  right: 122/@rem;
  border: 2/@rem solid #999999;
  border-radius: 40/@rem;
  transition: all 0.3s ease-in 0s;
}

.switch-checkbox:checked + .switch-label .switch-inner {
  margin-left: 0;
}

.switch-checkbox:checked + .switch-label .switch-switch {
  right: 0/@rem;
}